3.9.48 \(\int \frac {(A+B x) (a+b x+c x^2)}{x^2} \, dx\) [848]

Optimal. Leaf size=36 \[ -\frac {a A}{x}+(b B+A c) x+\frac {1}{2} B c x^2+(A b+a B) \log (x) \]

[Out]

-a*A/x+(A*c+B*b)*x+1/2*B*c*x^2+(A*b+B*a)*ln(x)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {779} \begin {gather*} \log (x) (a B+A b)-\frac {a A}{x}+x (A c+b B)+\frac {1}{2} B c x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a + b*x + c*x^2))/x^2,x]

[Out]

-((a*A)/x) + (b*B + A*c)*x + (B*c*x^2)/2 + (A*b + a*B)*Log[x]

Rule 779

Int[((e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand
Integrand[(e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, e, f, g, m}, x] && IntegerQ[p] && (
GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {(A+B x) \left (a+b x+c x^2\right )}{x^2} \, dx &=\int \left (b B \left (1+\frac {A c}{b B}\right )+\frac {a A}{x^2}+\frac {A b+a B}{x}+B c x\right ) \, dx\\ &=-\frac {a A}{x}+(b B+A c) x+\frac {1}{2} B c x^2+(A b+a B) \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 36, normalized size = 1.00 \begin {gather*} -\frac {a A}{x}+(b B+A c) x+\frac {1}{2} B c x^2+(A b+a B) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(a + b*x + c*x^2))/x^2,x]

[Out]

-((a*A)/x) + (b*B + A*c)*x + (B*c*x^2)/2 + (A*b + a*B)*Log[x]

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 34, normalized size = 0.94

method result size
default \(\frac {B c \,x^{2}}{2}+A c x +b B x +\left (A b +B a \right ) \ln \left (x \right )-\frac {a A}{x}\) \(34\)
risch \(\frac {B c \,x^{2}}{2}+A c x +b B x +A b \ln \left (x \right )+B \ln \left (x \right ) a -\frac {a A}{x}\) \(34\)
norman \(\frac {\left (A c +B b \right ) x^{2}-A a +\frac {B c \,x^{3}}{2}}{x}+\left (A b +B a \right ) \ln \left (x \right )\) \(39\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(c*x^2+b*x+a)/x^2,x,method=_RETURNVERBOSE)

[Out]

1/2*B*c*x^2+A*c*x+b*B*x+(A*b+B*a)*ln(x)-a*A/x

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 34, normalized size = 0.94 \begin {gather*} \frac {1}{2} \, B c x^{2} + {\left (B b + A c\right )} x + {\left (B a + A b\right )} \log \left (x\right ) - \frac {A a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)/x^2,x, algorithm="maxima")

[Out]

1/2*B*c*x^2 + (B*b + A*c)*x + (B*a + A*b)*log(x) - A*a/x

________________________________________________________________________________________

Fricas [A]
time = 1.81, size = 40, normalized size = 1.11 \begin {gather*} \frac {B c x^{3} + 2 \, {\left (B b + A c\right )} x^{2} + 2 \, {\left (B a + A b\right )} x \log \left (x\right ) - 2 \, A a}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)/x^2,x, algorithm="fricas")

[Out]

1/2*(B*c*x^3 + 2*(B*b + A*c)*x^2 + 2*(B*a + A*b)*x*log(x) - 2*A*a)/x

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 31, normalized size = 0.86 \begin {gather*} - \frac {A a}{x} + \frac {B c x^{2}}{2} + x \left (A c + B b\right ) + \left (A b + B a\right ) \log {\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x**2+b*x+a)/x**2,x)

[Out]

-A*a/x + B*c*x**2/2 + x*(A*c + B*b) + (A*b + B*a)*log(x)

________________________________________________________________________________________

Giac [A]
time = 1.78, size = 34, normalized size = 0.94 \begin {gather*} \frac {1}{2} \, B c x^{2} + B b x + A c x + {\left (B a + A b\right )} \log \left ({\left | x \right |}\right ) - \frac {A a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+b*x+a)/x^2,x, algorithm="giac")

[Out]

1/2*B*c*x^2 + B*b*x + A*c*x + (B*a + A*b)*log(abs(x)) - A*a/x

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 34, normalized size = 0.94 \begin {gather*} x\,\left (A\,c+B\,b\right )+\ln \left (x\right )\,\left (A\,b+B\,a\right )-\frac {A\,a}{x}+\frac {B\,c\,x^2}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a + b*x + c*x^2))/x^2,x)

[Out]

x*(A*c + B*b) + log(x)*(A*b + B*a) - (A*a)/x + (B*c*x^2)/2

________________________________________________________________________________________